﻿using System;
using System.Collections.Generic;

using E.BLL;
using E.Model;
using E.Enum;
using E.Web.UI.Page;

using X.Common;
using X.Pager;
using X.Pager.List;

namespace E.Web.Teacher.publics.course
{
    public partial class List : TeacherBasePage
    {
        public Dictionary<int, string> certificateList;
        public IList<ShortCourseModel> courseList = new List<ShortCourseModel>();
        public string act, name;
        public int certificateid;

        protected override void ShowPage()
        {
            certificateList = GetCertificateList();

            act = XRequest.GetString("act");
            name = XRequest.GetString("NameTxt");
            certificateid = XRequest.GetInt("CertificateSlt", -1);

            if (ispost || act == "s")
            {
                SearchCourseModel searchModel = new SearchCourseModel();
                searchModel.Name = name;
                searchModel.CnPID = certificateid;

                courseList = (new CourseBLL()).GetPublicCourseList(searchModel);
            }
        }

        protected void Page_Load(object sender, EventArgs e)
        {

        }
    }
}
